package model;

import view.Boundary;

public class Cup {
	private Die d1, d2;
	
	public Cup(){
		this.d1 = new Die();
		this.d2 = new Die();
	}
	
	public void roll(){
		this.d1.roll();
		this.d2.roll();
		Boundary.setDice(this.d1.getFacevalue(), this.d2.getFacevalue());
	}
	
	public int getSum(){
		return this.d1.getFacevalue() + this.d2.getFacevalue();
	}
	
	public boolean isSame(){
		return this.d1.getFacevalue() == this.d2.getFacevalue();
	}
	
	@Override
	public String toString() {
		return "Cup [sum=" + getSum() + (isSame() ? " Two of a kind" : "") + "]";
	}
}